<?php
$this->headTitle('Cấu hình hiển thị thiết bị IT','append');
?>
<div class='grid grid_8'>
    <div class="box-header">
        Chọn thông tin thuộc tính thiết bị hiển thị
    </div>
    <div class="box">
        <?php
            if($this->message !='')
                echo '<div class="notification ',$this->success,'"><span class="strong">',$this->message,'</span></div>';
            
    	?>
    	<form action="" method="post" name="frm" enctype="application/x-www-form-urlencoded" style="">
        	<div class='search-option-wrapper'>
            	<fieldset style="padding:10px;margin: 0 auto;border:  1px solid #d5d5d5;">
                	<legend><input id="checkAll" type="checkbox"/> SELECT ALL</legend>
                	<ul class='search-option-check'>
                		<?php foreach($this->viewsConfig as $key=>$val){ ?>
            				<li>
            					<input type="checkbox" name="option[]" value="<?php echo $key;?>" <?php if(is_array($this->option) && in_array($key, $this->option)) echo 'checked="checked"';?>/>
            					<label><?php echo $val['header']; ?></label>
                            </li>
                		<?php } ?>
                	</ul>
            	   <div style="clear: both;"></div>
            	</fieldset>
            	<p style="margin-top:20px;">
                    <input type="submit" name="btnsave" value="Lưu" class="button medium"/>
                </p>
        	</div>
    	</form>
        <div style="clear: both;"></div>
     </div>
</div>
<script type="text/javascript">
	$(document).ready(function() {
	  $('#checkAll').click( function() {
            $("input[type*='checkbox']").prop('checked', this.checked);
	  });
	});
</script>